Fix missing bits of the docs from cset 14020, and match that change by removing
authorEwan Mellor <ewan@xensource.com>
Tue, 27 Feb 2007 01:52:27 +0000 (01:52 +0000)
committerEwan Mellor <ewan@xensource.com>
Tue, 27 Feb 2007 01:52:27 +0000 (01:52 +0000)
the similar fields on host_metrics, PIF_metrics, and VM_guest_metrics.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
docs/xen-api/xenapi-datamodel.tex
tools/libxen/include/xen_host_metrics.h
tools/libxen/include/xen_pif_metrics.h
tools/libxen/include/xen_vm_guest_metrics.h
tools/libxen/src/xen_host_metrics.c
tools/libxen/src/xen_pif_metrics.c
tools/libxen/src/xen_vm_guest_metrics.c
tools/python/xen/xend/XendAPI.py

index 0d85fbdba276055fd80d84c285175e880c3e4994..cce4ae5cc7961b23bc4c121df6e963f8efb45a05 100644 (file)
@@ -62,8 +62,6 @@ VBD.VM & VM.VBDs & one-to-many\\
 crashdump.VM & VM.crash\_dumps & one-to-many\\
 VIF.VM & VM.VIFs & one-to-many\\
 VIF.network & network.VIFs & one-to-many\\
-host.metrics & host\_metrics.host & one-to-one\\
-PIF.metrics & PIF\_metrics.PIF & one-to-one\\
 PIF.host & host.PIFs & one-to-many\\
 PIF.network & network.PIFs & one-to-many\\
 SR.VDIs & VDI.SR & many-to-one\\
@@ -4475,7 +4473,6 @@ The metrics reported by the guest (as opposed to inferred from outside).}} \\
 Quals & Field & Type & Description \\
 \hline
 $\mathit{RO}_\mathit{run}$ &  {\tt uuid} & string & unique identifier/object reference \\
-$\mathit{RO}_\mathit{ins}$ &  {\tt VM} & VM ref & VM to which these metrics apply \\
 $\mathit{RO}_\mathit{run}$ &  {\tt os\_version} & (string $\rightarrow$ string) Map & version of the OS \\
 $\mathit{RO}_\mathit{run}$ &  {\tt PV\_drivers\_version} & (string $\rightarrow$ string) Map & version of the PV drivers \\
 $\mathit{RO}_\mathit{run}$ &  {\tt memory} & (string $\rightarrow$ string) Map & free/used/total memory \\
@@ -4534,38 +4531,6 @@ string
 }
 
 
-value of the field
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-\subsubsection{RPC name:~get\_VM}
-
-{\bf Overview:} 
-Get the VM field of the given VM\_guest\_metrics.
-
- \noindent {\bf Signature:} 
-\begin{verbatim} (VM ref) get_VM (session_id s, VM_guest_metrics ref self)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM\_guest\_metrics ref } & self & reference to the object \\ \hline 
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:} 
-{\tt 
-VM ref
-}
-
-
 value of the field
 \vspace{0.3cm}
 \vspace{0.3cm}
@@ -6109,7 +6074,6 @@ The metrics associated with a host.}} \\
 Quals & Field & Type & Description \\
 \hline
 $\mathit{RO}_\mathit{run}$ &  {\tt uuid} & string & unique identifier/object reference \\
-$\mathit{RO}_\mathit{ins}$ &  {\tt host} & host ref & Host to which these metrics apply \\
 $\mathit{RO}_\mathit{run}$ &  {\tt memory/total} & int & Host's total memory (bytes) \\
 $\mathit{RO}_\mathit{run}$ &  {\tt memory/free} & int & Host's free memory (bytes) \\
 \hline
@@ -6164,38 +6128,6 @@ string
 }
 
 
-value of the field
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-\subsubsection{RPC name:~get\_host}
-
-{\bf Overview:} 
-Get the host field of the given host\_metrics.
-
- \noindent {\bf Signature:} 
-\begin{verbatim} (host ref) get_host (session_id s, host_metrics ref self)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt host\_metrics ref } & self & reference to the object \\ \hline 
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:} 
-{\tt 
-host ref
-}
-
-
 value of the field
 \vspace{0.3cm}
 \vspace{0.3cm}
@@ -8783,7 +8715,6 @@ The metrics associated with a physical network interface.}} \\
 Quals & Field & Type & Description \\
 \hline
 $\mathit{RO}_\mathit{run}$ &  {\tt uuid} & string & unique identifier/object reference \\
-$\mathit{RO}_\mathit{ins}$ &  {\tt PIF} & PIF ref & PIF to which these metrics apply \\
 $\mathit{RO}_\mathit{run}$ &  {\tt io/read\_kbs} & float & Read bandwidth (KiB/s) \\
 $\mathit{RO}_\mathit{run}$ &  {\tt io/write\_kbs} & float & Write bandwidth (KiB/s) \\
 \hline
@@ -8838,38 +8769,6 @@ string
 }
 
 
-value of the field
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-\subsubsection{RPC name:~get\_PIF}
-
-{\bf Overview:} 
-Get the PIF field of the given PIF\_metrics.
-
- \noindent {\bf Signature:} 
-\begin{verbatim} (PIF ref) get_PIF (session_id s, PIF_metrics ref self)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt PIF\_metrics ref } & self & reference to the object \\ \hline 
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:} 
-{\tt 
-PIF ref
-}
-
-
 value of the field
 \vspace{0.3cm}
 \vspace{0.3cm}
index 37a6469e10646022a970b2a85dfa412fe1e9f0d9..31f3123364604565178123f28daed56a96a29260 100644 (file)
@@ -20,7 +20,6 @@
 #define XEN_HOST_METRICS_H
 
 #include "xen_common.h"
-#include "xen_host_decl.h"
 #include "xen_host_metrics_decl.h"
 
 
@@ -63,7 +62,6 @@ typedef struct xen_host_metrics_record
 {
     xen_host_metrics handle;
     char *uuid;
-    struct xen_host_record_opt *host;
     int64_t memory_total;
     int64_t memory_free;
 } xen_host_metrics_record;
@@ -169,13 +167,6 @@ extern bool
 xen_host_metrics_get_uuid(xen_session *session, char **result, xen_host_metrics host_metrics);
 
 
-/**
- * Get the host field of the given host_metrics.
- */
-extern bool
-xen_host_metrics_get_host(xen_session *session, xen_host *result, xen_host_metrics host_metrics);
-
-
 /**
  * Get the memory/total field of the given host_metrics.
  */
index 9d49bc8c1d7b97c84b470da5e5028e6e491d1081..b8dad22afaabbfa0aec2f052e993a9fc44eac326 100644 (file)
@@ -20,7 +20,6 @@
 #define XEN_PIF_METRICS_H
 
 #include "xen_common.h"
-#include "xen_pif_decl.h"
 #include "xen_pif_metrics_decl.h"
 
 
@@ -63,7 +62,6 @@ typedef struct xen_pif_metrics_record
 {
     xen_pif_metrics handle;
     char *uuid;
-    struct xen_pif_record_opt *pif;
     double io_read_kbs;
     double io_write_kbs;
 } xen_pif_metrics_record;
@@ -168,13 +166,6 @@ extern bool
 xen_pif_metrics_get_uuid(xen_session *session, char **result, xen_pif_metrics pif_metrics);
 
 
-/**
- * Get the PIF field of the given PIF_metrics.
- */
-extern bool
-xen_pif_metrics_get_pif(xen_session *session, xen_pif *result, xen_pif_metrics pif_metrics);
-
-
 /**
  * Get the io/read_kbs field of the given PIF_metrics.
  */
index fd328594df3d29406695fe790aee4f626acaf45f..61b8b5b2b7100ccc07e883ce283f3a204bdb9018 100644 (file)
@@ -21,7 +21,6 @@
 
 #include "xen_common.h"
 #include "xen_string_string_map.h"
-#include "xen_vm_decl.h"
 #include "xen_vm_guest_metrics_decl.h"
 
 
@@ -64,7 +63,6 @@ typedef struct xen_vm_guest_metrics_record
 {
     xen_vm_guest_metrics handle;
     char *uuid;
-    struct xen_vm_record_opt *vm;
     xen_string_string_map *os_version;
     xen_string_string_map *pv_drivers_version;
     xen_string_string_map *memory;
@@ -175,13 +173,6 @@ extern bool
 xen_vm_guest_metrics_get_uuid(xen_session *session, char **result, xen_vm_guest_metrics vm_guest_metrics);
 
 
-/**
- * Get the VM field of the given VM_guest_metrics.
- */
-extern bool
-xen_vm_guest_metrics_get_vm(xen_session *session, xen_vm *result, xen_vm_guest_metrics vm_guest_metrics);
-
-
 /**
  * Get the os_version field of the given VM_guest_metrics.
  */
@@ -225,7 +216,8 @@ xen_vm_guest_metrics_get_other(xen_session *session, xen_string_string_map **res
 
 
 /**
- * Return a list of all the VM_guest_metrics instances known to the system.
+ * Return a list of all the VM_guest_metrics instances known to the
+ * system.
  */
 extern bool
 xen_vm_guest_metrics_get_all(xen_session *session, struct xen_vm_guest_metrics_set **result);
index c54270bd2347c3befbfd07c3dd70e2ae2d9960c2..d82994dfd010406ff0e855b8af1254332df31dfc 100644 (file)
@@ -21,7 +21,6 @@
 #include <stdlib.h>
 
 #include "xen_common.h"
-#include "xen_host.h"
 #include "xen_host_metrics.h"
 #include "xen_internal.h"
 
@@ -40,9 +39,6 @@ static const struct_member xen_host_metrics_record_struct_members[] =
         { .key = "uuid",
           .type = &abstract_type_string,
           .offset = offsetof(xen_host_metrics_record, uuid) },
-        { .key = "host",
-          .type = &abstract_type_ref,
-          .offset = offsetof(xen_host_metrics_record, host) },
         { .key = "memory_total",
           .type = &abstract_type_int,
           .offset = offsetof(xen_host_metrics_record, memory_total) },
@@ -70,7 +66,6 @@ xen_host_metrics_record_free(xen_host_metrics_record *record)
     }
     free(record->handle);
     free(record->uuid);
-    xen_host_record_opt_free(record->host);
     free(record);
 }
 
@@ -115,23 +110,6 @@ xen_host_metrics_get_by_uuid(xen_session *session, xen_host_metrics *result, cha
 }
 
 
-bool
-xen_host_metrics_get_host(xen_session *session, xen_host *result, xen_host_metrics host_metrics)
-{
-    abstract_value param_values[] =
-        {
-            { .type = &abstract_type_string,
-              .u.string_val = host_metrics }
-        };
-
-    abstract_type result_type = abstract_type_string;
-
-    *result = NULL;
-    XEN_CALL_("host_metrics.get_host");
-    return session->ok;
-}
-
-
 bool
 xen_host_metrics_get_memory_total(xen_session *session, int64_t *result, xen_host_metrics host_metrics)
 {
index 1b30e1293ec5cead29dd955a0e67b99a860fc48e..65e3e22f3b8331029734a1ac07b7b004131812e0 100644 (file)
@@ -22,7 +22,6 @@
 
 #include "xen_common.h"
 #include "xen_internal.h"
-#include "xen_pif.h"
 #include "xen_pif_metrics.h"
 
 
@@ -40,9 +39,6 @@ static const struct_member xen_pif_metrics_record_struct_members[] =
         { .key = "uuid",
           .type = &abstract_type_string,
           .offset = offsetof(xen_pif_metrics_record, uuid) },
-        { .key = "PIF",
-          .type = &abstract_type_ref,
-          .offset = offsetof(xen_pif_metrics_record, pif) },
         { .key = "io_read_kbs",
           .type = &abstract_type_float,
           .offset = offsetof(xen_pif_metrics_record, io_read_kbs) },
@@ -70,7 +66,6 @@ xen_pif_metrics_record_free(xen_pif_metrics_record *record)
     }
     free(record->handle);
     free(record->uuid);
-    xen_pif_record_opt_free(record->pif);
     free(record);
 }
 
@@ -115,23 +110,6 @@ xen_pif_metrics_get_by_uuid(xen_session *session, xen_pif_metrics *result, char
 }
 
 
-bool
-xen_pif_metrics_get_pif(xen_session *session, xen_pif *result, xen_pif_metrics pif_metrics)
-{
-    abstract_value param_values[] =
-        {
-            { .type = &abstract_type_string,
-              .u.string_val = pif_metrics }
-        };
-
-    abstract_type result_type = abstract_type_string;
-
-    *result = NULL;
-    XEN_CALL_("PIF_metrics.get_PIF");
-    return session->ok;
-}
-
-
 bool
 xen_pif_metrics_get_io_read_kbs(xen_session *session, double *result, xen_pif_metrics pif_metrics)
 {
index 80f4390af96056fabea11b59d96dd052c1fe85ce..dd464c4806d168c992944521c08e5e50c48507e6 100644 (file)
@@ -23,7 +23,6 @@
 #include "xen_common.h"
 #include "xen_internal.h"
 #include "xen_string_string_map.h"
-#include "xen_vm.h"
 #include "xen_vm_guest_metrics.h"
 
 
@@ -41,9 +40,6 @@ static const struct_member xen_vm_guest_metrics_record_struct_members[] =
         { .key = "uuid",
           .type = &abstract_type_string,
           .offset = offsetof(xen_vm_guest_metrics_record, uuid) },
-        { .key = "VM",
-          .type = &abstract_type_ref,
-          .offset = offsetof(xen_vm_guest_metrics_record, vm) },
         { .key = "os_version",
           .type = &abstract_type_string_string_map,
           .offset = offsetof(xen_vm_guest_metrics_record, os_version) },
@@ -83,7 +79,6 @@ xen_vm_guest_metrics_record_free(xen_vm_guest_metrics_record *record)
     }
     free(record->handle);
     free(record->uuid);
-    xen_vm_record_opt_free(record->vm);
     xen_string_string_map_free(record->os_version);
     xen_string_string_map_free(record->pv_drivers_version);
     xen_string_string_map_free(record->memory);
@@ -134,23 +129,6 @@ xen_vm_guest_metrics_get_by_uuid(xen_session *session, xen_vm_guest_metrics *res
 }
 
 
-bool
-xen_vm_guest_metrics_get_vm(xen_session *session, xen_vm *result, xen_vm_guest_metrics vm_guest_metrics)
-{
-    abstract_value param_values[] =
-        {
-            { .type = &abstract_type_string,
-              .u.string_val = vm_guest_metrics }
-        };
-
-    abstract_type result_type = abstract_type_string;
-
-    *result = NULL;
-    XEN_CALL_("VM_guest_metrics.get_VM");
-    return session->ok;
-}
-
-
 bool
 xen_vm_guest_metrics_get_os_version(xen_session *session, xen_string_string_map **result, xen_vm_guest_metrics vm_guest_metrics)
 {
index 843ac800c68d9b201a948bd0eb8991c3e9de4f9b..4ab6916b53c8bb7d7cee3f42065802299b0d804c 100644 (file)
@@ -802,8 +802,7 @@ class XendAPI(object):
     # ----------------------------------------------------------------
 
     host_metrics_attr_ro = ['memory_total',
-                            'memory_free',
-                            'host']
+                            'memory_free']
     host_metrics_attr_rw = []
     host_metrics_methods = []
 
@@ -816,14 +815,10 @@ class XendAPI(object):
     def host_metrics_get_record(self, _, ref):
         return xen_api_success({
             'uuid'         : ref,
-            'host'         : XendNode.instance().uuid,
             'memory_total' : self._host_metrics_get_memory_total(),
             'memory_free'  : self._host_metrics_get_memory_free(),
             })
 
-    def host_metrics_get_host(self, _, ref):
-        return xen_api_success(XendNode.instance().uuid)
-
     def host_metrics_get_memory_total(self, _, ref):
         return xen_api_success(self._host_metrics_get_memory_total())
 
@@ -968,8 +963,7 @@ class XendAPI(object):
     # Xen API: Class PIF_metrics
     # ----------------------------------------------------------------
 
-    PIF_metrics_attr_ro = ['PIF',
-                           'io_read_kbs',
+    PIF_metrics_attr_ro = ['io_read_kbs',
                            'io_write_kbs']
     PIF_metrics_attr_rw = []
     PIF_methods = []
@@ -983,9 +977,6 @@ class XendAPI(object):
     def PIF_metrics_get_record(self, _, ref):
         return xen_api_success(self._PIF_metrics_get(ref).get_record())
 
-    def PIF_metrics_get_PIF(self, _, ref):
-        return xen_api_success(self._PIF_metrics_get(ref).pif.uuid)
-
     def PIF_metrics_get_io_read_kbs(self, _, ref):
         return xen_api_success(self._PIF_metrics_get(ref).get_io_read_kbs())